<template>
  <header>
    <span @click="leftCut">{{isEit?'编辑':'完成'}}</span>
    <section>购物车</section>
    <span @click="$emit('rightClick')">筛选</span>
  </header>
</template>

<script>
import { ref, reactive, toRefs } from "vue";
export default {
  setup(props,{emit}) {
    const isEit = ref(true);
    const leftCut = () => {
       isEit.value = !isEit.value;
       emit('leftClick',isEit.value);
    }
    return {
      isEit,
      leftCut
    }
  },
};
</script>
<style lang="scss" scoped>
header {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: rgba(206, 63, 6, 0.883);
  color: #fff;
  span {
    width: 60px;
    text-align: center;
  }
  section {
    flex: 1;
    text-align: center;
  }
}
</style>